'use strict';
swan_pc.config(
    function ($stateProvider, $urlRouterProvider,$httpProvider, $locationProvider, $uibModalProvider,$translateProvider,$animateProvider, tmhDynamicLocaleProvider, httpRequestInterceptorCacheBusterProvider,AlertServiceProvider) {
        $animateProvider.classNameFilter(/angular-animate/);
        //enable CSRF
        $httpProvider.defaults.xsrfCookieName = 'CSRF-TOKEN';
        $httpProvider.defaults.xsrfHeaderName = 'X-CSRF-TOKEN';

        //Cache everything except rest api requests
        httpRequestInterceptorCacheBusterProvider.setMatchlist([/.*api.*/, /.*protected.*/], true);

        $urlRouterProvider.otherwise('/');
        $stateProvider.state('site', {
            'abstract':true,
            views: {
                'navbar@': {
                    templateUrl: 'scripts/components/navbar/navbar.html',
                    controller: 'NavbarController'
                },
                // 'left_menu@': {
                //
                //     templateUrl: 'scripts/components/left_menu/left_menu.html',
                //     controller: 'LeftMenuController'
                // }
            }
        })
        $stateProvider.state(
            'notFound',
            {
                url:'/notFound',
                templateUrl:'404.html',
                //controller:'NotfoundCtrl as vm'
            })
    }
)
